﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Meeting.Model
{
    /// <summary>
    /// 投票结果表
    /// </summary>
    [Serializable]
    public partial class VoteResult
    {
        public VoteResult()
        { }
        #region Model
        private int _id;
        private int _meetingid;
        private int _voteid;
        private string _selectvalue;
        private string _employeeid = "";
        private string _employeename = "";
        private string _roleid = "";
        private string _employeetitle = "";
        private int _subofficeid = 0;
        /// <summary>
        /// 
        /// </summary>
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 会议主键（外键）
        /// </summary>
        public int MeetingId
        {
            set { _meetingid = value; }
            get { return _meetingid; }
        }
        /// <summary>
        /// 投票主键（外键）
        /// </summary>
        public int VoteId
        {
            set { _voteid = value; }
            get { return _voteid; }
        }
        /// <summary>
        /// 投票选项值（如果是多选，以逗号隔开。值为投票选项Id）
        /// </summary>
        public string SelectValue
        {
            set { _selectvalue = value; }
            get { return _selectvalue; }
        }
        /// <summary>
        /// 参与投票人主键（对应政务系统用户帐号）
        /// </summary>
        public string EmployeeId
        {
            set { _employeeid = value; }
            get { return _employeeid; }
        }
        /// <summary>
        /// 参与投票人的姓名（对应政务系统中文名称）
        /// </summary>
        public string EmployeeName
        {
            set { _employeename = value; }
            get { return _employeename; }
        }
        /// <summary>
        /// 参与投票人的角色ID
        /// </summary>
        public string RoleId
        {
            set { _roleid = value; }
            get { return _roleid; }
        }
        /// <summary>
        /// 参与投票人的职务
        /// </summary>
        public string EmployeeTitle
        {
            set { _employeetitle = value; }
            get { return _employeetitle; }
        }
        /// <summary>
        /// 提交日期
        /// </summary>
        public DateTime UpdateDate
        {
            set;
            get;
        }

        /// <summary>
        /// 分局ID
        /// </summary>
        public int SubOfficeId
        {
            get
            {
                return _subofficeid;
            }
            set
            {
                _subofficeid = value;
            }
        }
        #endregion Model

        #region 附加属性
        /// <summary>
        /// 生成选择值的列表
        /// </summary>
        public List<string> ValueList
        {
            get
            {
                return SelectValue.Split(',').ToList();
            }
        }
        #endregion
    }
}

